﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace JXT.PrimaryKey.Batman.Log
{
    /// <summary>
    /// 日志访问接口
    /// </summary>
    public interface ILogger
    {
        /// <summary>
        /// 写入新的日志
        /// </summary>
        /// <param name="message">日志信息</param>
        /// <param name="exception">异常信息</param>
        /// <param name="level">日志等级</param>
        void Write(string message, Exception exception = null, LogLevel level = LogLevel.Message);

        /// <summary>
        /// 写入消息级日志
        /// </summary>
        /// <param name="message">日志信息</param>
        /// <param name="exception">异常信息</param>
        void Message(string message, Exception exception = null);

        /// <summary>
        /// 写入调试级日志
        /// </summary>
        /// <param name="message">日志信息</param>
        /// <param name="exception">日志异常</param>
        void Debug(string message, Exception exception = null);

        /// <summary>
        /// 写入警告级日志
        /// </summary>
        /// <param name="message">日志信息</param>
        /// <param name="exception">日志异常</param>
        void Wraning(string message, Exception exception = null);

        /// <summary>
        /// 写入错误级日志
        /// </summary>
        /// <param name="message">日志信息</param>
        /// <param name="exception">日志异常</param>
        void Error(string message, Exception exception = null);

        /// <summary>
        /// 写入失败日志
        /// </summary>
        /// <param name="message">日志信息</param>
        /// <param name="exception">日志异常</param>
        void Fatal(string message, Exception exception = null);
    }
}
